<?php

namespace app\admin\controller;

use think\App;
use think\Controller;
use think\Request;
use app\admin\services\AdminService;
use app\admin\services\InoutService;
use app\admin\services\ProblemService;
use app\admin\services\NoticeService;
use think\facade\Session;

class Cash extends Controller
{
    public function __construct(Request $request = null, App $app = null)
    {
        parent::__construct($request, $app);
        $this->adminService = new AdminService();
        $this->InoutService = new InoutService();
        $this->ProblemService = new ProblemService();
        $this->NoticeService = new NoticeService();
    }


    /**
     * @param 待解决问题数量
     */
    public function getnewMsge(){
       $mycount = $this->ProblemService->condata();
        return json($mycount);
    }

    public function datalist(){
        header('Access-Control-Allow-Origin:*');
        header("Access-Control-Allow-Credentials", "true");
        $data = $this->NoticeService->wailist();
        return json($data);
    }

}